<?php
	session_start();
	require_once './data/Banque.php';
	$banque = unserialize($_SESSION['banque']);
	$_SESSION['user'] = null;
	
 	if($banque != null){
 		$_SESSION['user'] = $banque->__get('nom');
		if($banque->__get('login') == ConfigClement::$admin_login && $banque->__get('password') == ConfigClement::$admin_pwd){
			$_SESSION['user'] = 'admin';
		}
	} else {
		header("Location:index.php");
	}
?>